package com.chaopei.znpk.tools;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.chaopei.znpk.entity.Class;
import com.chaopei.znpk.mapper.ClassMapper;

public class EastExcelListener extends AnalysisEventListener<Class> {

    private ClassMapper classMapper;

    public EastExcelListener(ClassMapper classMapper){
        this.classMapper =classMapper;
    }

    @Override
    public void invoke(Class aclass, AnalysisContext analysisContext) {
        classMapper.insert(aclass);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
